<link type="text/css" rel="stylesheet" href="css/services.css"/>
<div class="container">
		<h1>Sửa nhân viên</h1>
<?php     

echo form_open(current_url()); ?>
		<div id = "top_reserve">
			<div id = "content-right" class="action">
			
			<div>
			<p>
        <input type="image" id="button_submit" name="button_submit" value="Lưu" class="imageButtonSmall"/>
		<?php 
		$data = array(
			'name' => 'button_cancel',
			'id' => 'button_cancel',
			'value' => 'true',
			'type' => 'button',
			'content' => 'Hủy',
			'onclick'=>"history.go(-1);return false;"
		);

		echo form_button($data);
		?>
</p></div> <!-- end opt_box -->
			</div> <!-- end add_new -->
		</div> <!-- end top_reserve -->	
<div style="width:500px;margin:0 auto;">
<?php echo $custom_error; ?>
<?php echo form_hidden('EE_ID',$result->EE_ID) ?>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Personal_ID">Tên đăng nhập<span class="required"><font color="red">*</font></span></label>                                
                <input id="Personal_ID" type="text" name="Personal_ID" value="<?php echo $result->Personal_ID ?>"  />
                <?php echo form_error('Personal_ID','<div>','</div>'); ?>
                </p></span>
				<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Name">Tên<span class="required"><font color="red">*</font></span></label>                                
                <input id="Name" type="text" name="Name" value="<?php echo $result->Name ?>"  />
                <?php echo form_error('Name','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Password">Mật khẩu<span class="required"><font color="red">*</font></span></label>                                
                <input id="Password" type="password" name="Password" value="<?php echo $result->Password ?>"  />
                <?php echo form_error('Password','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="DOB">Ngày sinh</label>                                
                <input id="DOB" type="text" name="DOB" value="<?php echo date("d/m/Y",$result->DOB) ?>"  />
                <?php echo form_error('DOB','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Phone_NO">Số đt</label>                                
                <input id="Phone_NO" type="text" name="Phone_NO" value="<?php echo $result->Phone_NO ?>"  />
                <?php echo form_error('Phone_NO','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Street">Đường</label>                                
                <input id="Street" type="text" name="Street" value="<?php echo $result->Street ?>"  />
                <?php echo form_error('Street','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Position">Vị trí</label>                                
                <input id="Position" type="text" name="Position" value="<?php echo $result->Position ?>"  />
                <?php echo form_error('Position','<div>','</div>'); ?>
                </p></span>
				<?php if($role == ADMINISTRATOR){?>
				<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Salary">Lương</label>                                
                <input id="Salary" type="text" name="Salary" value="<?php echo $result->Salary ?>"  />
                <?php echo form_error('Salary','<div>','</div>'); ?>
                </p></span>
				<?php } ?>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Yrs_of_exp">Kinh nghiệm</label>                                
                <input id="Yrs_of_exp" type="text" name="Yrs_of_exp" value="<?php echo $result->Yrs_of_exp ?>"  />
                <?php echo form_error('Yrs_of_exp','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Education_Level">Học vấn</label>                                
                <input id="Education_Level" type="text" name="Education_Level" value="<?php echo $result->Education_Level ?>"  />
                <?php echo form_error('Education_Level','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Hired_Dt">Ngày kí hợp đồng</label>                                
                <input id="Hired_Dt" type="text" name="Hired_Dt" value="<?php echo date("d/m/Y",$result->Hired_Dt) ?>"  />
                <?php echo form_error('Hired_Dt','<div>','</div>'); ?>
                </p></span>
<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Term_Dt">Ngày hết hợp đồng</label>                                
                <input id="Term_Dt" type="text" name="Term_Dt" value="<?php echo date("d/m/Y",$result->Term_Dt) ?>"  />
                <?php echo form_error('Term_Dt','<div>','</div>'); ?>
                </p></span>
	<span style=" clear:both;padding:5px;"><p>
				<label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Role">Quyền</label>                <div class="styled-select">
				<?php  echo $combobox_cats;?>
            </div></p>
		</span>
				<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Active">Kích hoạt</label><?php 
						$data = array(
							"name"        => "Active",
							"id"          => "Active",
							"value"       => 1,
							"checked"     => $result->Active==1,
							"style"       => "float: left;",
						);
						echo form_checkbox($data); ?> 
                </p></span>
				<span style=" clear:both; float:left; padding:5px;">
                <p><label style="float: left; text-align: right; margin-right: 5px; width: 135px;" for="Active">% Dịch vụ</label><?php 
						$data = array(
							"name"        => "Dichvu",
							"id"          => "Dichvu",
							"value"       => 1,
							"checked"     => $result->Dichvu==1,
							"style"       => "float: left;",
						);
						echo form_checkbox($data); ?> 
                </p></span>

<?php echo form_close(); ?>
	</div>
</div>
